import { defineMock } from '@alova/mock';
import { resultSuccess } from '../_util';

export default defineMock({
  '[POST]/api/user/load/users': ({ data }) => {
    return resultSuccess({
      data: [
        {
          id: 1,
          name: '张三',
        },
        {
          id: 2,
          name: '李四',
        },
      ],
    });
  },
  '[POST]/api/user/userInfo/gets': ({ data }) => {
    return resultSuccess({
      data: [
        { id: 3, name: 'name1', sex: '男' },
        { id: 4, name: 'name2', sex: '男' },
        { id: 12, name: 'name3', sex: '女' },
      ],
      total: 3,
    });
  },
  '[POST]/api/user/userInfo/get': ({ data }) => {
    return resultSuccess({
      data: { one: 'name1', two: 1 },
    });
  },
});
